package com.wbl.tijianssm.controller;

import com.wbl.tijianssm.pojo.Hospital;
import com.wbl.tijianssm.response.ApiRestResponse;
import com.wbl.tijianssm.service.HospitalService;
import com.wbl.tijianssm.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/hospital")
public class HospitalController {

    @Autowired
    HospitalService hospitalService;

    @ResponseBody
    @GetMapping("/getAll")
    public ApiRestResponse getHospitalList(){
        return hospitalService.getHospitalList();
    }

    @ResponseBody
    @PostMapping("/getbyHpId")
    public ApiRestResponse getHospitalInfo(@RequestBody Hospital hospital){
        return hospitalService.getHospitalInfo(hospital);
    }
}

